package cn.cool.springframework.beans.factory.support;

import cn.cool.springframework.beans.BeansException;
import cn.cool.springframework.core.io.Resource;
import cn.cool.springframework.core.io.ResourceLoader;

/**
 * simple interface for bean definition readers
 * 加载xml配置文件，读取配置文件，加载 BeanDefinition 到 DefaultListableBeanFactory
 */
public interface BeanDefinitionReader {
    BeanDefinitionRegistry getRegistry();

    ResourceLoader getResourceLoader();

    void loadBeanDefinitions(Resource resource) throws BeansException;

    void loadBeanDefinitions(Resource... resources) throws BeansException;

    void loadBeanDefinitions(String location) throws BeansException;

    void loadBeanDefinitions(String[] locations) throws BeansException;
}
